<template>
  <van-popup
    v-model="isShow"
    class="add-price-popup-wrap"
    :overlay="true"
    position="bottom"
    @closed="closePopup"
  >
    <div class="add-price-content-wrap">
      <div class="title-header">
        <p>加价设置</p>
        <i class="icon-close" @click="closePopup"></i>
      </div>
      <addPrice />
      <div class="confirm-btn-wrap">
        <div class="confirm-btn" @click="handleSure">确定</div>
      </div>
    </div>
  </van-popup>
</template>

<script>
import addPrice from './addPrice.vue';

export default {
  name: 'addPricePopup',
  props: {
    activityId: {
      type: String,
      required: true
    }
  },
  components: {
    addPrice
  },
  data() {
    return {
      isShow: false
    };
  },
  methods: {
    showDialog() {
      this.isShow = true;
    },
    closePopup() {
      this.isShow = false;
    },
    handleSure() {}
  }
};
</script>

<style lang="scss" scoped>
.add-price-popup-wrap {
  border-radius: 8px 8px 0 0;
}
.add-price-content-wrap {
  height: 7.32rem;
  position: relative;
  background-color: #f8f8f8;

  .title-header {
    height: 1.08rem;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    p {
      height: 100%;
      color: #333333;
      font-size: 0.32rem;
      text-align: center;
      line-height: 1.08rem;
      font-family: PingFangSC-Regular;
    }
    .icon-close {
      position: absolute;
      right: 0.2rem;
      top: 50%;
      width: 0.4rem;
      height: 0.4rem;
      background: url('../../../assets/addPrice/icon_close.png') no-repeat;
      background-size: 100% 100%;
      margin-top: -0.2rem;
    }
  }

  .confirm-btn-wrap {
    width: 100%;
    position: absolute;
    bottom: 0.2rem;
    left: 0;
    .confirm-btn {
      margin: 0 0.32rem;
      height: 0.84rem;
      line-height: 0.84rem;
      text-align: center;
      background: rgba(230, 37, 37, 1);
      border-radius: 0.44rem;
      font-size: 0.32rem;
      font-family: PingFangSC-Regular;
      font-weight: 400;
      color: white;
    }
  }
}
</style>
